package com.xebia.lightning.service;

import java.util.Date;
import java.util.List;

import com.xebia.lightning.domain.Tweet;

public class TweetServiceImpl implements TweetService {

    public List<Tweet> findAllTweetsByTweetId(long tweetId) {
        return tweetRepository.findByTweetId(tweetId);
    }

    @Override
    public List<Tweet> findByPersitedDateBetween(Date startDate, Date endDate) {
        return tweetRepository.findByPersitedDateBetween(startDate, endDate);
    }

    @Override
    public List<Tweet> findAllUnprocessedTweets() {
        return tweetRepository.findAllTweetsByProcessed(false);
    }
    
    @Override
    public List<com.xebia.lightning.domain.Tweet> findAllTweetsForLinks(String url){
        return tweetRepository.findByLinks(url);
    }
}
